import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login/Login.vue'
import Register from '../views/login/Register.vue'
import FaceRecognition from '../views/login/FaceRecognition.vue'
import DoctorLogin from '../views/login/DoctorLogin.vue'
import DoctorRegister from '../views/login/DoctorRegister.vue'
import DoctorProfile from '../views/DoctorProfile.vue'
import DoctorInfoForm from '../views/DoctorInfoForm.vue'
import DoctorPersonalProfile from '../views/profile/DoctorPersonalProfile.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/doctor/login'
    },
    // 主导航布局页面 - 使用NavigationLayout
    {
      path: '/dashboard',
      name: 'dashboard',
      component: DoctorProfile,
      meta: { requiresAuth: true }
    },
    // 传统Home页面 - 有自己的导航栏，不使用NavigationLayout
    {
      path: '/home',
      name: 'home',
      component: Home
    },
    // 人脸识别登录注册 - 不使用NavigationLayout
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/recognition',
      name: 'faceRecognition',
      component: FaceRecognition
    },
    // 医生密码登录注册 - 不使用NavigationLayout
    {
      path: '/doctor/login',
      name: 'doctorLogin',
      component: DoctorLogin
    },
    {
      path: '/doctor/register',
      name: 'doctorRegister',
      component: DoctorRegister
    },
    {
      path: '/doctor/info-form',
      name: 'doctorInfoForm',
      component: DoctorInfoForm
    },
    // 医生个人设置页面 - 使用NavigationLayout
    {
      path: '/doctor/personal-profile',
      name: 'doctorPersonalProfile',
      component: DoctorPersonalProfile,
      meta: { requiresAuth: true }
    }
  ]
})

export default router


